package tech.aistar.day07.interfaces.fun;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2021/3/16 3:20 下午
 */
public class TestFunable2 {
    public static void main(String[] args) {
        Funable2 f2 = new Funable2() {
            @Override
            public void test(int a, int b) {
                System.out.println("a:"+a);
                System.out.println("b:"+b);
            }
        };

        //lambda表达式来替代 - 只能应用在函数式接口中啊!!!
        Funable2 f3 = (a,b) -> {
            System.out.println("a:"+a);
            System.out.println("b:"+b);
        };

        f3.test(10,20);
    }
}
